/**
 * @Author: 耿立强
 * @Date: 2019/6/20
 * @Last Modified by:   耿立强
 * @Last Modified time: 2019-06-20 15:45:00
 */
import axios from '@/api/fetch';
import SERVER from '@/api/server';

// 车辆终身质保审核列表
export const vehicleWarrantyList = params => axios.get(`${SERVER.DMSCLOUD_ACTIVITY}/ttRpVehicleWarranty/vehicleWarrantyList`, {params});

export const vehicleWarrantyListAll = params => axios.get(`${SERVER.DMSCLOUD_ACTIVITY}/ttRpVehicleWarranty/vehicleWarrantyListAll`, {params});

export const getWarranty = params => axios.get(`${SERVER.DMSCLOUD_ACTIVITY}/ttRpVehicleWarranty/getWarranty/${params.warrantyId}`);

export const getVehicle = params => axios.get(`${SERVER.DMSCLOUD_ACTIVITY}/ttRpVehicleWarranty/getVehicle`, {params});

export const blackAudit = params => axios.post(`${SERVER.DMSCLOUD_ACTIVITY}/ttRpVehicleWarranty/blackAudit`, params);

//保存
export const addVehicleWarranty = params => axios.post(`${SERVER.DMSCLOUD_ACTIVITY}/ttRpVehicleWarranty/addVehicleWarranty`, params);

//批量驳回
export const blackAuditAll = params => axios.post(`${SERVER.DMSCLOUD_ACTIVITY}/ttRpVehicleWarranty/blackAuditAll`, params);


//更新数据
export const updatePara = params => axios.post(`${SERVER.DMSCLOUD_ACTIVITY}/ttRpThreeInfo/updatePara`, params);

//经销商列表查询
export const byAllInfo = params => axios.get(`${SERVER.CMSCLOUD_CHANNEL}/message/dealerAttach/dealerInfo/byAllInfo`);

//文件预览下载
export const downFile = params => {
  return axios({
    url:`${SERVER.DMSCLOUD_ACTIVITY}/ttRpVehicleWarranty/downFile`,
    method:'get',
    params:params,
    responseType: 'blob'
  });
};





